From: emellor@ewan Date: Thu, 22 Sep 2005 10:09:11 +0000 (+0100) Subject: this patch fixes the bug that when "cpu" is not set in config file, X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16780^2~9 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7dfa4a382a7d34e77942a1d3bfb105af4dd6248c;p=xen.git this patch fixes the bug that when "cpu" is not set in config file, control panel complains "Error creating domain - int argument required". Signed-off-by: Xin Li --- diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index 7702a7602c..0ef3457326 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -155,6 +155,8 @@ class ImageHandler: if dom <= 0: raise VmError('Creating domain failed: name=%s' % self.vm.getName()) + if cpu is None: + cpu = -1; log.debug("initDomain: cpu=%d mem_kb=%d ssidref=%d dom=%d", cpu, mem_kb, ssidref, dom) xc.domain_setcpuweight(dom, cpu_weight) xc.domain_setmaxmem(dom, mem_kb)